import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    redirect: '/roleManage',
    component: () => import('@/views/Home'),
    children: [
      { path: '/userManage', name: 'UserManage', component: () => import('@/views/userManage/UserManage') },
      { path: '/roleManage', name: 'RoleManage', component: () => import('@/views/roleManage/RoleManage') }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
